﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GenericLibrariesToolKit;
using Model;

namespace BLL.Info.Impl
{
    /// <summary>
    /// 新闻业务接口实现
    /// </summary>
    public class NewsBOImpl : DaoSupport<News>, NewsBO
    {
        public List<News> ShowLatestTopNews(int topNumber)
        {
            Dictionary<string, string> orderByDate = new Dictionary<string, string>();
            //添加排序条件及排序方式
            orderByDate.Add("NewsDate", "desc");
            //执行查询
            QueryResult<News> newsQueryResult = this.GetScrollData(0, topNumber, orderByDate);
            //获取数据列表
            List<News> news = newsQueryResult.ResultList;
            return news;
        }
    }
}
